<template>
    <div>
        <div>
            <mt-button @click.prevent="move(1)" type="primary">面板一</mt-button>
            <mt-button @click.prevent="move(2)">面板二</mt-button>
            <mt-button @click.prevent="move(3)">面板三</mt-button>
            <mt-button @click.prevent="move(4)">面板四</mt-button>
        </div>
        <div>
            <mt-tab-container v-model="active">  <!-- 父面板 -->
                <mt-tab-container-item id="tab1">这是面板1</mt-tab-container-item>
                <mt-tab-container-item id="tab2">这是面板2</mt-tab-container-item>
                <mt-tab-container-item id="tab3">这是面板3</mt-tab-container-item>
                <mt-tab-container-item id="tab4">这是面板4</mt-tab-container-item>
            </mt-tab-container>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return {
            active:"tab1"
        }
    },
    methods:{
        move(n){
            this.active = "tab" + n;
        }
    }
}
</script>

<style>

</style>